package myschool.test;

import myschool.dao.SubjectDao;
import myschool.entity.Subject;
import myschool.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class Query2 {
    public static void main(String[] args) {
        SqlSession s= MybatisUtil.get();
//        List<Subject> objects = s.selectList("myschool.dao.SubjectDao.findALL");
//        System.out.println(objects);

        SubjectDao mapper = s.getMapper(SubjectDao.class);
        System.out.println(mapper.findTotal()+"总数");
        MybatisUtil.close(s);
    }
}
